<%@ include file="/jsp/include.jsp" %>

<%
String toolbarItem = ParamUtil.getString(request, "toolbarItem", "view-all");
String backURL = ParamUtil.getString(request, "backURL");
%>

<div class="lfr-portlet-toolbar">
	<portlet:renderURL windowState="<%= WindowState.MAXIMIZED.toString() %>" var="viewBookURL">
		<portlet:param name="action" value="viewCategory" />
	</portlet:renderURL>

	<span class="lfr-toolbar-button view-button <%= toolbarItem.equals("view-all") ? "current" : StringPool.BLANK %>">
		<a href="<%= viewBookURL %>"><liferay-ui:message key="Command.ViewAll" /></a>
	</span>

	<portlet:renderURL windowState="<%= WindowState.MAXIMIZED.toString() %>" var="editBookURL">
		<portlet:param name="action" value="editCategory" />
		<portlet:param name="redirect" value="<%= currentURL %>" />
	</portlet:renderURL>
	<span class="lfr-toolbar-button add-button <%= toolbarItem.equals("add") ? "current" : StringPool.BLANK %>"><a href="<%= editBookURL %>"><liferay-ui:message key="Command.Add" /></a></span>
	<c:if test="<%= Validator.isNotNull(backURL) %>">
		<span class="lfr-toolbar-button back-button">
			<a href="<%= HtmlUtil.escape(backURL) %>">&laquo; <liferay-ui:message key="back" /></a>
		</span>
	</c:if>
</div>